package com.chinadci.smartcommunitysystembackstage.service;

import com.chinadci.smartcommunitysystembackstage.entity.ScsAdmin;
import com.chinadci.smartcommunitysystembackstage.entity.ScsRepair;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chinadci.smartcommunitysystembackstage.mapper.ScsAdmintypeMapper;
import com.chinadci.smartcommunitysystembackstage.mapper.ScsRepairMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Code Duck
 * @since 2021-04-13
 */
@Service
public class ScsRepairService{
    @Autowired
    private ScsRepairMapper mapper;

    private Logger log= LoggerFactory.getLogger(this.getClass());

    //显示所有报修列表
    public List<ScsRepair> Find(String time){
        log.info("=====显示所有报修列表");
        List<ScsRepair> list=null;
        if (time!="" && time!=null && !time.equals("null")){
            list= mapper.Find("%"+time+"%");
        }else{
            list= mapper.Find("%%");
        }
        return list;
    }
}
